The background description provided herein is for the purpose of generally presenting the context of the disclosure. Work of the presently named inventors, to the extent the work is described in this background section, as well as aspects of the description that may not otherwise qualify as prior art at the time of filing, are neither expressly nor impliedly admitted as prior art against the present disclosure.
A process virtual machine in a mobile device can include a just-in-time (JIT) compiler or an ahead-of-time compiler (AOT). The JIT compiler can dynamically compile frequently executed short segments of bytecode of an application into native machine code while the application is running. An AOT compiler can compile entire bytecode of an application into native machine code upon installation of the application which are later executed. Code optimizations, such as loop optimizations, can be performed by the JIT compiler or AOT compiler during the compiling processes.